const stor = require('../sorage/sqlite3.js');

module.exports = async (req, res) => {
  const id = parseInt(req.url.split('/')[2]);

  const user = await stor.getUserById(id);
  res.writeHead(200);
  res.end(JSON.stringify({ message: user }));
}